package com.itheima.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.mapper.UmsMemberLevelMapper;
import com.itheima.pojo.UmsMemberLevel;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class UmsMemberLevelServiceApiImpl implements UmsMemberLevelServiceApi {

    @Autowired
    private UmsMemberLevelMapper memberLevelMapper;

    @Override
    public List<UmsMemberLevel> list(Integer defaultStatus) {
        LambdaQueryWrapper<UmsMemberLevel> wrapper=new LambdaQueryWrapper<>();
        wrapper.eq(UmsMemberLevel::getDefaultStatus,defaultStatus);
        List<UmsMemberLevel> umsMemberLevels = memberLevelMapper.selectList(wrapper);
        return umsMemberLevels;
    }
}